﻿<extend name="Public:base" />
<block name="block-meta">
    <meta name="keywords" content="专业的外包项目库，兼职项目需求，在线协作办公，在家办公">
    <meta name="description" content="般若虾—专注中高端脑力兼职平台，专业需求项目库，聚集了设计、文案、策划、营销、广告、工程师、美工、UI设计师、品牌、程序开发、安卓、IOS、社交媒体、数据分析、翻译、产品、推广、客服、市场等专业人才，高品质服务，坚持不比稿，让外包更轻松提升效率。">
</block>
<block name="title"><title>般若虾（boroshare）—中高端脑力兼职-项目库，专业人才，全心服务。</title></block>
<block name="header_styles">
    <link href="__Public__/themes/css/page.css" rel="stylesheet" />
    <style type="text/css">
        .link-favorite {
            position: relative;
            z-index: 9;
        }
    </style>
</block>
<block name="main">
    <div class="basic-info-title">找兼职</div>
    <form id="stForm" action="{:U('/projects')}" method="post">
        <div class="search-form">
            <input type="hidden" id="timegap" name="timegap" value="{$timegap}" />
            <input type="hidden" id="sortype" name='sortype' value="{$sortype}" />
            <ul>
                <li>发布时间：</li>
                <li><a href="javascript:void(0);" data-ttype="1" class="searchbytime tag <if condition='$timegap eq 1'>active</if>">近一周</a></li>
                <li><a href="javascript:void(0);" data-ttype="2" class="searchbytime tag <if condition='$timegap eq 2'>active</if>">近一个月</a></li>
                <li><a href="javascript:void(0);" data-ttype="0" class="searchbytime tag <if condition='$timegap eq 0'>active</if>">全部</a></li>
            </ul>
            <ul>
                <li>排序方式：</li>
                <li><a href="javascript:void(0);" data-stype="1" class="sortby tag <if condition='$sortype eq 1'>active</if>">已托管</a></li>
                <li><a href="javascript:void(0);" data-stype="2" class="sortby tag <if condition='$sortype eq 2'>active</if>">职位数最多</a></li>
                <li><a href="javascript:void(0);" data-stype="3" class="sortby tag <if condition='$sortype eq 3'>active</if>">薪酬最高</a></li>
            </ul>
        </div>
    </form>
    <div class="search-content">
        <!-- id="divContainer" -->
        <volist name="project" id="vo">
            <div class="search-item">
                <div class="item-bottom">
                    <div class="item-heading">
                        <a href="{$vo.pid|genJobURL}">{$vo.name}</a>
                        <span class="pull-right item-amount">&#165;{$vo.salary}</span>
                    </div>
                    <div class="item-row">
                        <span class="pull-left item-position item-row-col">{$vo.tname}</span>
                        <a href="javascript:void(0);" class="pull-right tuo-guang <gt name='vo.moneyin' value='0'>active</gt>" style="margin-top:6px;">{$vo.moneyin|toTuoguanDesc}</a>
                    </div>
                    <div class="item-row">
                        <div class="pull-left item-row-col">
                            招聘人数：<span>{$vo.num}</span>人
                        </div>
                        <div class="pull-right item-row-col">
                            剩余席位：<span>{$vo['num']-$vo['datastate']}</span>人
                        </div>
                    </div>
                    <div class="item-row">
                        <div class="pull-left item-row-col" style="max-width: 70%;">
                            <label class="label-creator">创建者：</label>{$vo.creater}
                        </div>
                        <if condition='$vo.faved gt 0'>
                            <a href="javascript:void(0);" class="favbtn pull-right item-row-favcol" data-job="{$vo.id}" data-ftype="2">
                                <i class="fa fa-heart red"></i>&nbsp;{$vo.fc}
                            </a>
                            <else />
                            <a href="javascript:void(0);" class="favbtn pull-right item-row-favcol" data-job="{$vo.id}" data-ftype="1">
                                <i class="fa fa-heart"></i>&nbsp;{$vo.fc}
                            </a>
                        </if>
                    </div>
                </div>
            </div>
        </volist>
    </div>
    <div class="result page meneame">{$page}</div>
    <div style="display: none;">
        <div id="tooltipcontent1" class="tooltipcontent1">
            <div style="width:300px;text-align:left;">
                {$tip}
            </div>
        </div>
    </div>
</block>
<block name="footer_scripts">
    <!--<script type="text/javascript">
        function sortAndTime(ttype, stype) {
            $('#timegap').val(ttype);
            $('#sortype').val(stype);
            $('#stForm').submit();
        }
        function timegap(ttype) {
            var stype = $('#sortype').val();
            sortAndTime(ttype, stype);
        }
        function sort(stype) {
            var ttype = $('#timegap').val();
            sortAndTime(ttype, stype);
        }
    </script>
    <script type="text/javascript" src="__Public__/js/jobfav.js"></script>-->
    <if condition="$uid gt 0">
        <else />
        <script type="text/javascript">
            //setPara({
            //    'before': function (self) {
            //        showLoginForm_centre();
            //        return false;
            //    }
            //});
        </script>
    </if>

    <script type="text/javascript">
        //setPara({
        //    'before': function (self) {
        //        showLoginForm_centre();
        //        return false;
        //    }
        //});
        require(["jquery"], function ($) {
            $(".searchbytime").on("click", function () {
                var ttype = $(this).data("ttype");
                var stype = $('#sortype').val();
                $('#timegap').val(ttype);
                $('#sortype').val(stype);
                $('#stForm').submit();
            });

            $(".sortby").on("click", function () {
                var ttype = $('#timegap').val();
                var stype = $(this).data("stype");
                $('#timegap').val(ttype);
                $('#sortype').val(stype);
                $('#stForm').submit();
            });
        });

        require(["modules/jobfav"], function (jobfav) {
            var isLogged = parseInt('{$uid!=null?1:0}');
            jobfav.init(isLogged);
        });
    </script>



</block>
